home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.awt;
-
- import java.awt.Label;
- import symantec.itools.db.pro.ProjBinder;
- import symantec.itools.db.pro.Record;
- import symantec.itools.db.pro.RecordLink;
- import symantec.itools.db.pro.RelationView;
- import symjava.sql.SQLException;
-
- public class RecordStateLabel extends Label implements RecordLink {
- ProjBinder m_ProjBinder;
-
- public RecordStateLabel() {
- super("<Record State Label>");
- }
-
- public void init() {
- ((Label)this).setText("Unknown");
- }
-
- public void notifyRecordChange(Record currentRecord) throws SQLException {
- if (currentRecord != null) {
- ((Label)this).setText(currentRecord.getStateString());
- }
-
- }
-
- public void setRelationView(RelationView rv) {
- try {
- rv.bindCurrentRecord(this);
- } catch (SQLException ex) {
- System.out.println(((Throwable)ex).getMessage());
- }
- }
- }
-